﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace DTcms.Core.DBFactory.Migrations
{
    /// <inheritdoc />
    public partial class initDatabase : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "dt_app_adverts",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    CallIndex = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_app_adverts", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_app_feedbacks",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ReplyContent = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ReplyBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ReplyTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Status = table.Column<byte>(type: "tinyint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_app_feedbacks", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_app_links",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    TelPhone = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    SiteUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LogoUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    IsRecom = table.Column<byte>(type: "tinyint", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_app_links", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_areas",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_areas", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_categorys",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    ChannelId = table.Column<int>(type: "int", nullable: false),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    CallIndex = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    ImgUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LinkUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Content = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    SeoTitle = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    SeoKeyword = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SeoDescription = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_categorys", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_labels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_labels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_manager_logs",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Method = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Path = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Query = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    StatusCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_manager_logs", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_manager_menu_models",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    NavType = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    SubTitle = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    IconUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LinkUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Controller = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Resource = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_manager_menu_models", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_manager_menus",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    ChannelId = table.Column<int>(type: "int", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    SubTitle = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    IconUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LinkUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    IsSystem = table.Column<byte>(type: "tinyint", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Controller = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Resource = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_manager_menus", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_member_groups",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Grade = table.Column<int>(type: "int", nullable: false),
                    Amount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Exp = table.Column<int>(type: "int", nullable: false),
                    IsUpgrade = table.Column<byte>(type: "tinyint", nullable: false),
                    IsDefault = table.Column<byte>(type: "tinyint", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_member_groups", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_notify_templates",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Type = table.Column<byte>(type: "tinyint", nullable: false),
                    CallIndex = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    TemplateId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsSystem = table.Column<byte>(type: "tinyint", nullable: false),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_notify_templates", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_payments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    ImgUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Type = table.Column<byte>(type: "tinyint", nullable: false),
                    PayUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    NotifyUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_payments", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_roles",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RoleType = table.Column<byte>(type: "tinyint", nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    IsSystem = table.Column<byte>(type: "tinyint", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_roles", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_menus",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    SubTitle = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    IconUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LinkUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_menus", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_sites",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    DirPath = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    Logo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Company = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Address = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Tel = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Fax = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Email = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Crod = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Copyright = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SeoTitle = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SeoKeyword = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SeoDescription = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    IsDefault = table.Column<byte>(type: "tinyint", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_sites", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_sysconfig",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Type = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    JsonData = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_sysconfig", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_users",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    RefreshToken = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LastIp = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    LastTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
                    PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
                    TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
                    LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
                    LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
                    AccessFailedCount = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_users", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "dt_app_advert_banners",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AdvertId = table.Column<int>(type: "int", nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FilePath = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LinkUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    StartTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    EndTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_app_advert_banners", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_app_advert_banners_dt_app_adverts_AdvertId",
                        column: x => x.AdvertId,
                        principalTable: "dt_app_adverts",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_role_claims",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RoleId = table.Column<int>(type: "int", nullable: false),
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_role_claims", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_role_claims_dt_roles_RoleId",
                        column: x => x.RoleId,
                        principalTable: "dt_roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_channels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    IsComment = table.Column<byte>(type: "tinyint", nullable: false),
                    IsAlbum = table.Column<byte>(type: "tinyint", nullable: false),
                    IsAttach = table.Column<byte>(type: "tinyint", nullable: false),
                    IsContribute = table.Column<byte>(type: "tinyint", nullable: false),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_channels", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_site_channels_dt_sites_SiteId",
                        column: x => x.SiteId,
                        principalTable: "dt_sites",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_domains",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    Domain = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_domains", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_site_domains_dt_sites_SiteId",
                        column: x => x.SiteId,
                        principalTable: "dt_sites",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_oauths",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    Provider = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Type = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    ImgUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    ClientId = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    ClientSecret = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_oauths", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_site_oauths_dt_sites_SiteId",
                        column: x => x.SiteId,
                        principalTable: "dt_sites",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_payments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    PaymentId = table.Column<int>(type: "int", nullable: false),
                    Type = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Key1 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
                    Key2 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
                    Key3 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
                    Key4 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
                    Key5 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_payments", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_site_payments_dt_payments_PaymentId",
                        column: x => x.PaymentId,
                        principalTable: "dt_payments",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_site_payments_dt_sites_SiteId",
                        column: x => x.SiteId,
                        principalTable: "dt_sites",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_managers",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    Avatar = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    RealName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    IsAudit = table.Column<byte>(type: "tinyint", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_managers", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_managers_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_member_attach_records",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    AttachId = table.Column<long>(type: "bigint", nullable: false),
                    FileName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_member_attach_records", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_member_attach_records_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_member_balance_records",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    CurrAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Value = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_member_balance_records", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_member_balance_records_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_member_messages",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Content = table.Column<string>(type: "text", nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsRead = table.Column<byte>(type: "tinyint", nullable: false),
                    ReadTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_member_messages", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_member_messages_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_member_point_records",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    CurrPoint = table.Column<int>(type: "int", nullable: false),
                    Value = table.Column<int>(type: "int", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_member_point_records", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_member_point_records_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_member_recharges",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Amount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_member_recharges", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_member_recharges_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_members",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    ReferrerId = table.Column<int>(type: "int", nullable: false),
                    GroupId = table.Column<int>(type: "int", nullable: false),
                    Avatar = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    RealName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Sex = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Birthday = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Amount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Point = table.Column<int>(type: "int", nullable: false),
                    Exp = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    RegIp = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    RegTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsReseller = table.Column<byte>(type: "tinyint", nullable: false),
                    OrderAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    CommAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    ExpiryTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_members", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_members_dt_member_groups_GroupId",
                        column: x => x.GroupId,
                        principalTable: "dt_member_groups",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_members_dt_sites_SiteId",
                        column: x => x.SiteId,
                        principalTable: "dt_sites",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_members_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_user_claims",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_user_claims", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_user_claims_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_user_logins",
                columns: table => new
                {
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ProviderKey = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UserId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_user_logins", x => new { x.LoginProvider, x.ProviderKey });
                    table.ForeignKey(
                        name: "FK_dt_user_logins_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_user_roles",
                columns: table => new
                {
                    UserId = table.Column<int>(type: "int", nullable: false),
                    RoleId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_user_roles", x => new { x.UserId, x.RoleId });
                    table.ForeignKey(
                        name: "FK_dt_user_roles_dt_roles_RoleId",
                        column: x => x.RoleId,
                        principalTable: "dt_roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_user_roles_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_user_tokens",
                columns: table => new
                {
                    UserId = table.Column<int>(type: "int", nullable: false),
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_user_tokens", x => new { x.UserId, x.LoginProvider, x.Name });
                    table.ForeignKey(
                        name: "FK_dt_user_tokens_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_contributes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    ChannelId = table.Column<int>(type: "int", nullable: false),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Source = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Author = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    ImgUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    FieldMeta = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AlbumMeta = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AttachMeta = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Zhaiyao = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Content = table.Column<string>(type: "text", nullable: true),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdateBy = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_contributes", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_contributes_dt_site_channels_ChannelId",
                        column: x => x.ChannelId,
                        principalTable: "dt_site_channels",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_articles",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    ChannelId = table.Column<int>(type: "int", nullable: false),
                    CallIndex = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
                    Source = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Author = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    LinkUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    ImgUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    VideoUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SeoTitle = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    SeoKeyword = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SeoDescription = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Zhaiyao = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Content = table.Column<string>(type: "text", nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    Click = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    IsComment = table.Column<byte>(type: "tinyint", nullable: false),
                    CommentCount = table.Column<int>(type: "int", nullable: false),
                    LikeCount = table.Column<int>(type: "int", nullable: false),
                    AddBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdateBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_articles", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_articles_dt_site_channels_ChannelId",
                        column: x => x.ChannelId,
                        principalTable: "dt_site_channels",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_channel_fields",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ChannelId = table.Column<int>(type: "int", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    ControlType = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    ItemOption = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DefaultValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    IsPassword = table.Column<byte>(type: "tinyint", nullable: false),
                    IsRequired = table.Column<byte>(type: "tinyint", nullable: false),
                    EditorType = table.Column<byte>(type: "tinyint", nullable: false),
                    ValidTipMsg = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    ValidErrorMsg = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    ValidPattern = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_channel_fields", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_site_channel_fields_dt_site_channels_ChannelId",
                        column: x => x.ChannelId,
                        principalTable: "dt_site_channels",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_site_oauth_logins",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    OAuthId = table.Column<int>(type: "int", nullable: false),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    Provider = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    OpenId = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_site_oauth_logins", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_site_oauth_logins_dt_site_oauths_OAuthId",
                        column: x => x.OAuthId,
                        principalTable: "dt_site_oauths",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_site_oauth_logins_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_order_payments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    RechargeId = table.Column<int>(type: "int", nullable: true),
                    TradeNo = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    PaymentId = table.Column<int>(type: "int", nullable: true),
                    TradeType = table.Column<byte>(type: "tinyint", nullable: false),
                    PaymentType = table.Column<byte>(type: "tinyint", nullable: true),
                    PaymentTitle = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    PaymentAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    EndTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_order_payments", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_order_payments_dt_member_recharges_RechargeId",
                        column: x => x.RechargeId,
                        principalTable: "dt_member_recharges",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_dt_order_payments_dt_site_payments_PaymentId",
                        column: x => x.PaymentId,
                        principalTable: "dt_site_payments",
                        principalColumn: "Id");
                    table.ForeignKey(
                        name: "FK_dt_order_payments_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_albums",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    ThumbPath = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    OriginalPath = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_albums", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_albums_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_attachs",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    FileName = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    FilePath = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    FileSize = table.Column<int>(type: "int", nullable: false),
                    FileExt = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Point = table.Column<int>(type: "int", nullable: false),
                    DownCount = table.Column<int>(type: "int", nullable: false),
                    SortId = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_attachs", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_attachs_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_category_relations",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    CategoryId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_category_relations", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_category_relations_dt_article_categorys_CategoryId",
                        column: x => x.CategoryId,
                        principalTable: "dt_article_categorys",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_article_category_relations_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_comments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SiteId = table.Column<int>(type: "int", nullable: false),
                    ChannelId = table.Column<int>(type: "int", nullable: false),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    RootId = table.Column<int>(type: "int", nullable: false),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    UserIp = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    AtUserId = table.Column<int>(type: "int", nullable: false),
                    AtUserName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Content = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
                    LikeCount = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<byte>(type: "tinyint", nullable: false),
                    IsDelete = table.Column<byte>(type: "tinyint", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_comments", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_comments_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_article_comments_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_field_values",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    FieldId = table.Column<int>(type: "int", nullable: false),
                    FieldName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    FieldValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_field_values", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_field_values_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_groups",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    GroupId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_groups", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_groups_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_article_groups_dt_member_groups_GroupId",
                        column: x => x.GroupId,
                        principalTable: "dt_member_groups",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_label_relations",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    LabelId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_label_relations", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_label_relations_dt_article_labels_LabelId",
                        column: x => x.LabelId,
                        principalTable: "dt_article_labels",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_article_label_relations_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_likes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleId = table.Column<long>(type: "bigint", nullable: false),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_likes", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_likes_dt_articles_ArticleId",
                        column: x => x.ArticleId,
                        principalTable: "dt_articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_dt_article_likes_dt_users_UserId",
                        column: x => x.UserId,
                        principalTable: "dt_users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "dt_article_comment_likes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommentId = table.Column<int>(type: "int", nullable: false),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dt_article_comment_likes", x => x.Id);
                    table.ForeignKey(
                        name: "FK_dt_article_comment_likes_dt_article_comments_CommentId",
                        column: x => x.CommentId,
                        principalTable: "dt_article_comments",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "dt_manager_menu_models",
                columns: new[] { "Id", "Controller", "IconUrl", "LinkUrl", "Name", "NavType", "ParentId", "Resource", "SortId", "SubTitle", "Title" },
                values: new object[,]
                {
                    { 1, "Article", null, null, "manage", "Channel", 0, "Show", 99, null, null },
                    { 2, "Article", null, "/article/list", "article", "Channel", 1, "Show,View,Add,Edit,Audit,Delete", 99, null, "内容管理" },
                    { 3, "ArticleCategory", null, "/article/category/list", "ategory", "Channel", 1, "Show,View,Add,Edit,Delete", 101, null, "栏目类别" },
                    { 5, "ArticleLabel", null, "/article/label/list", "label", "Channel", 1, "Show,View,Add,Edit,Delete", 105, null, "标签管理" },
                    { 6, "ArticleComment", null, "/article/comment/list", "comment", "Channel", 1, "Show,View,Add,Edit,Delete", 107, null, "评论管理" },
                    { 7, "ArticleContribute", null, "/article/contribute/list", "contribute", "Channel", 1, "Show,View,Add,Edit,Delete", 109, null, "投稿管理" }
                });

            migrationBuilder.InsertData(
                table: "dt_manager_menus",
                columns: new[] { "Id", "AddBy", "AddTime", "ChannelId", "Controller", "IconUrl", "IsSystem", "LinkUrl", "Name", "ParentId", "Remark", "Resource", "SortId", "Status", "SubTitle", "Title" },
                values: new object[,]
                {
                    { 1, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(3748), 0, "Site", "iconfont icon-home-full", (byte)1, null, "sys_contents", 0, "系统默认导航，请勿更改", "Show", 99, (byte)0, "站点", "站点管理" },
                    { 2, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(4049), 0, "Plugin", "iconfont icon-plugin-full", (byte)1, null, "sys_application", 0, "系统默认导航，请勿更改", "Show", 102, (byte)0, "应用", "应用管理" },
                    { 3, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(4259), 0, "Member", "iconfont icon-user-full", (byte)1, null, "sys_members", 0, "系统默认导航，请勿更改", "Show", 103, (byte)0, "会员", "会员管理" },
                    { 6, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(4441), 0, "Setting", "iconfont icon-setting-full", (byte)0, null, "sys_Controller", 0, "系统默认导航，请勿更改", "Show", 106, (byte)0, "控制面板", "控制面板" },
                    { 10, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(4618), 0, "Channel", null, (byte)0, null, "site_main", 1, null, "Show", 99, (byte)0, null, "默认站点" },
                    { 20, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(4772), 0, "Link", null, (byte)0, null, "apply_link_manage", 2, null, "Show", 99, (byte)0, null, "友情链接" },
                    { 21, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(4915), 0, "Link", null, (byte)0, "/apply/link/list", "apply_link_list", 20, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "链接列表" },
                    { 23, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5047), 0, "Feedback", null, (byte)0, null, "apply_feedback_manage", 2, null, "Show", 103, (byte)0, null, "留言反馈" },
                    { 24, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5182), 0, "Feedback", null, (byte)0, "/apply/feedback/list", "apply_feedback_list", 23, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "留言列表" },
                    { 25, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5312), 0, "Advert", null, (byte)0, null, "apply_advert_manage", 2, null, "Show", 105, (byte)0, null, "广告管理" },
                    { 26, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5454), 0, "Advert", null, (byte)0, "/apply/advert/list", "apply_advert_list", 25, null, "Show,View,Add,Edit,Delete", 99, (byte)0, null, "广告位管理" },
                    { 27, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5581), 0, "AdvertBanner", null, (byte)0, "/apply/advert/banner/list", "apply_banner_list", 25, null, "Show,View,Add,Edit,Delete", 100, (byte)0, null, "内容管理" },
                    { 50, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5742), 0, "Member", null, (byte)0, null, "member_manage", 3, null, "Show", 99, (byte)0, null, "会员管理" },
                    { 51, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5849), 0, "Member", null, (byte)0, "/member/audit", "member_audit", 50, null, "Show,View,Audit", 99, (byte)0, null, "会员审核" },
                    { 52, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(5974), 0, "Member", null, (byte)0, "/member/list", "member_list", 50, null, "Show,View,Add,Edit,Audit,Delete", 100, (byte)0, null, "会员列表" },
                    { 53, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6109), 0, "MemberGroup", null, (byte)0, "/member/group/list", "member_group", 50, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "会员组别" },
                    { 60, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6245), 0, "Member", null, (byte)0, null, "member_log", 3, null, "Show", 100, (byte)0, null, "会员日志" },
                    { 61, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6355), 0, "MemberMessage", null, (byte)0, "/member/message/list", "member_message", 60, null, "Show,View,Add,Delete", 99, (byte)0, null, "站内消息" },
                    { 62, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6482), 0, "MemberRecharge", null, (byte)0, "/member/recharge/list", "member_recharge", 60, null, "Show,View,Add,Complete,Delete", 100, (byte)0, null, "充值记录" },
                    { 63, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6609), 0, "MemberBalance", null, (byte)0, "/member/balance/list", "member_balance", 60, null, "Show,View,Add,Delete", 101, (byte)0, null, "消费记录" },
                    { 64, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6734), 0, "MemberPoint", null, (byte)0, "/member/point/list", "member_point", 60, null, "Show,View,Add,Delete", 102, (byte)0, null, "积分记录" },
                    { 70, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6856), 0, "Member", null, (byte)0, null, "member_settings", 3, null, "Show", 101, (byte)0, null, "会员设置" },
                    { 71, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(6968), 0, "Setting@MemberConfig", null, (byte)0, "/member/config", "member_config", 70, null, "Show,View,Edit", 99, (byte)0, null, "参数设置" },
                    { 72, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7093), 0, "NotifyTemplate", null, (byte)0, "/member/template/list", "member_template", 70, null, "Show,View,Add,Edit,Delete", 100, (byte)0, null, "消息模板" },
                    { 130, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7218), 0, "Setting", null, (byte)0, null, "sys_settings", 6, null, "Show", 99, (byte)0, null, "系统管理" },
                    { 131, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7324), 0, "Setting@SysConfig", null, (byte)0, "/setting/config", "sys_config", 130, null, "Show,View,Edit", 99, (byte)0, null, "系统设置" },
                    { 132, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7450), 0, "Site", null, (byte)0, "/setting/site/list", "sys_site_manage", 130, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "站点管理" },
                    { 133, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7575), 0, "Channel", null, (byte)0, "/setting/channel/list", "sys_channel_manage", 130, null, "Show,View,Add,Edit,Delete", 103, (byte)0, null, "频道管理" },
                    { 140, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7701), 0, "Setting", null, (byte)0, null, "sys_module_manage", 6, null, "Show", 101, (byte)0, null, "功能管理" },
                    { 141, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(7810), 0, "Area", null, (byte)0, "/setting/area/list", "area_list", 140, null, "Show,View,Add,Edit,Delete", 99, (byte)0, null, "地区管理" },
                    { 142, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(8147), 0, "Payment", null, (byte)0, "/setting/payment/list", "payment_list", 140, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "支付方式" },
                    { 143, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(8475), 0, "OAuth", null, (byte)0, "/setting/oauth/list", "oauth_list", 140, null, "Show,View,Add,Edit,Delete", 103, (byte)0, null, "授权管理" },
                    { 144, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(8603), 0, "SiteMenu", null, (byte)0, "/setting/menu/list", "site_menu_list", 140, null, "Show,View,Add,Edit,Delete", 105, (byte)0, null, "前台菜单" },
                    { 145, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(8732), 0, "ManagerMenu", null, (byte)0, "/manager/menu/list", "manager_menu_list", 140, null, "Show,View,Add,Edit,Delete", 107, (byte)0, null, "后台菜单" },
                    { 150, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(8862), 0, "Manager", null, (byte)0, null, "sys_manager", 6, null, "Show", 103, (byte)0, null, "系统用户" },
                    { 151, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(8974), 0, "Manager", null, (byte)0, "/manager/list", "manager_list", 150, null, "Show,View,Add,Edit,Delete", 99, (byte)0, null, "管理员管理" },
                    { 152, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9102), 0, "ManagerRole", null, (byte)0, "/manager/role/list", "manager_role", 150, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "角色管理" },
                    { 153, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9231), 0, "ManagerLog", null, (byte)0, "/manager/log/list", "manager_log", 150, null, "Show,View,Delete", 103, (byte)0, null, "管理日志" },
                    { 154, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9362), 1, "Article@1", null, (byte)1, null, "site_main_news_manage", 10, null, "Show", 99, (byte)0, null, "新闻资讯" },
                    { 155, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9495), 1, "Article@1", null, (byte)1, "/article/list", "site_main_news_article", 154, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "内容管理" },
                    { 156, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9639), 1, "ArticleCategory@1", null, (byte)1, "/article/category/list", "site_main_news_ategory", 154, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "栏目类别" },
                    { 157, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9788), 1, "ArticleLabel@1", null, (byte)1, "/article/label/list", "site_main_news_label", 154, null, "Show,View,Add,Edit,Delete", 105, (byte)0, null, "标签管理" },
                    { 158, null, new DateTime(2024, 10, 16, 17, 12, 48, 653, DateTimeKind.Local).AddTicks(9935), 1, "ArticleComment@1", null, (byte)1, "/article/comment/list", "site_main_news_comment", 154, null, "Show,View,Add,Edit,Delete", 107, (byte)0, null, "评论管理" },
                    { 159, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(81), 1, "ArticleContribute@1", null, (byte)1, "/article/contribute/list", "site_main_news_contribute", 154, null, "Show,View,Add,Edit,Delete", 109, (byte)0, null, "投稿管理" },
                    { 160, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(227), 2, "Article@2", null, (byte)1, null, "site_main_photo_manage", 10, null, "Show", 100, (byte)0, null, "图片分享" },
                    { 161, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(358), 2, "Article@2", null, (byte)1, "/article/list", "site_main_photo_article", 160, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "内容管理" },
                    { 162, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(503), 2, "ArticleCategory@2", null, (byte)1, "/article/category/list", "site_main_photo_ategory", 160, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "栏目类别" },
                    { 163, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(681), 2, "ArticleLabel@2", null, (byte)1, "/article/label/list", "site_main_photo_label", 160, null, "Show,View,Add,Edit,Delete", 105, (byte)0, null, "标签管理" },
                    { 164, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(833), 2, "ArticleComment@2", null, (byte)1, "/article/comment/list", "site_main_photo_comment", 160, null, "Show,View,Add,Edit,Delete", 107, (byte)0, null, "评论管理" },
                    { 165, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(980), 2, "ArticleContribute@2", null, (byte)1, "/article/contribute/list", "site_main_photo_contribute", 160, null, "Show,View,Add,Edit,Delete", 109, (byte)0, null, "投稿管理" },
                    { 166, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1125), 3, "Article@3", null, (byte)1, null, "site_main_video_manage", 10, null, "Show", 101, (byte)0, null, "视频中心" },
                    { 167, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1254), 3, "Article@3", null, (byte)1, "/article/list", "site_main_video_article", 166, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "内容管理" },
                    { 168, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1400), 3, "ArticleCategory@3", null, (byte)1, "/article/category/list", "site_main_video_ategory", 166, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "栏目类别" },
                    { 169, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1543), 3, "ArticleLabel@3", null, (byte)1, "/article/label/list", "site_main_video_label", 166, null, "Show,View,Add,Edit,Delete", 105, (byte)0, null, "标签管理" },
                    { 170, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1690), 3, "ArticleComment@3", null, (byte)1, "/article/comment/list", "site_main_video_comment", 166, null, "Show,View,Add,Edit,Delete", 107, (byte)0, null, "评论管理" },
                    { 171, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1837), 3, "ArticleContribute@3", null, (byte)1, "/article/contribute/list", "site_main_video_contribute", 166, null, "Show,View,Add,Edit,Delete", 109, (byte)0, null, "投稿管理" },
                    { 172, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(1985), 4, "Article@4", null, (byte)1, null, "site_main_down_manage", 10, null, "Show", 102, (byte)0, null, "资源下载" },
                    { 173, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2114), 4, "Article@4", null, (byte)1, "/article/list", "site_main_down_article", 172, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "内容管理" },
                    { 174, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2261), 4, "ArticleCategory@4", null, (byte)1, "/article/category/list", "site_main_down_ategory", 172, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "栏目类别" },
                    { 175, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2409), 4, "ArticleLabel@4", null, (byte)1, "/article/label/list", "site_main_down_label", 172, null, "Show,View,Add,Edit,Delete", 105, (byte)0, null, "标签管理" },
                    { 176, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2555), 4, "ArticleComment@4", null, (byte)1, "/article/comment/list", "site_main_down_comment", 172, null, "Show,View,Add,Edit,Delete", 107, (byte)0, null, "评论管理" },
                    { 177, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2707), 4, "ArticleContribute@4", null, (byte)1, "/article/contribute/list", "site_main_down_contribute", 172, null, "Show,View,Add,Edit,Delete", 109, (byte)0, null, "投稿管理" },
                    { 178, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2853), 5, "Article@5", null, (byte)1, null, "site_main_content_manage", 10, null, "Show", 103, (byte)0, null, "公司介绍" },
                    { 179, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(2980), 5, "Article@5", null, (byte)1, "/article/list", "site_main_content_article", 178, null, "Show,View,Add,Edit,Audit,Delete", 99, (byte)0, null, "内容管理" },
                    { 180, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(3158), 5, "ArticleCategory@5", null, (byte)1, "/article/category/list", "site_main_content_ategory", 178, null, "Show,View,Add,Edit,Delete", 101, (byte)0, null, "栏目类别" },
                    { 181, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(3316), 5, "ArticleLabel@5", null, (byte)1, "/article/label/list", "site_main_content_label", 178, null, "Show,View,Add,Edit,Delete", 105, (byte)0, null, "标签管理" },
                    { 182, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(3463), 5, "ArticleComment@5", null, (byte)1, "/article/comment/list", "site_main_content_comment", 178, null, "Show,View,Add,Edit,Delete", 107, (byte)0, null, "评论管理" },
                    { 183, null, new DateTime(2024, 10, 16, 17, 12, 48, 654, DateTimeKind.Local).AddTicks(3608), 5, "ArticleContribute@5", null, (byte)1, "/article/contribute/list", "site_main_content_contribute", 178, null, "Show,View,Add,Edit,Delete", 109, (byte)0, null, "投稿管理" }
                });

            migrationBuilder.InsertData(
                table: "dt_member_groups",
                columns: new[] { "Id", "AddBy", "AddTime", "Amount", "Exp", "Grade", "IsDefault", "IsUpgrade", "Status", "Title" },
                values: new object[] { 1, "admin", new DateTime(2024, 4, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 0m, 0, 0, (byte)1, (byte)1, (byte)0, "普通会员" });

            migrationBuilder.InsertData(
                table: "dt_notify_templates",
                columns: new[] { "Id", "CallIndex", "Content", "IsSystem", "TemplateId", "Title", "Type", "UpdateTime" },
                values: new object[,]
                {
                    { 1, "usercode", "{\"code\":\"{code}\",\"valid\":\"{valid}\"}", (byte)0, "usercode", "手机验证码", (byte)2, null },
                    { 2, "usercode", "您本次的邮箱验证码为{code}，{valid}分钟内有效。本邮件来自于{webname}，请勿回复！", (byte)0, null, "您的邮箱验证码", (byte)1, null }
                });

            migrationBuilder.InsertData(
                table: "dt_payments",
                columns: new[] { "Id", "ImgUrl", "NotifyUrl", "PayUrl", "Remark", "SortId", "Status", "Title", "Type" },
                values: new object[,]
                {
                    { 1, null, null, null, null, 99, (byte)0, "线下", (byte)0 },
                    { 2, null, null, "/balancepay", "使用预存款扣款", 99, (byte)0, "余额", (byte)1 },
                    { 3, null, "/wechatpay/notify", "/wechatpay/", "欢迎使用微信支付", 99, (byte)0, "微信", (byte)2 },
                    { 4, null, "/alipay/notify", "/alipay/", "推荐使用支付宝支付", 99, (byte)0, "支付宝", (byte)3 }
                });

            migrationBuilder.InsertData(
                table: "dt_roles",
                columns: new[] { "Id", "ConcurrencyStamp", "IsSystem", "Name", "NormalizedName", "RoleType", "Title" },
                values: new object[,]
                {
                    { 1, null, (byte)1, "Member", "MEMBER", (byte)0, "普通会员" },
                    { 2, null, (byte)1, "Admin", "ADMIN", (byte)1, "系统管理员" },
                    { 3, null, (byte)1, "SuperAdmin", "SUPERADMIN", (byte)2, "超级管理员" }
                });

            migrationBuilder.InsertData(
                table: "dt_site_menus",
                columns: new[] { "Id", "AddBy", "AddTime", "IconUrl", "LinkUrl", "ParentId", "Remark", "SortId", "Status", "SubTitle", "Title" },
                values: new object[,]
                {
                    { 1, "admin", new DateTime(2024, 6, 23, 0, 0, 1, 0, DateTimeKind.Unspecified), null, null, 0, null, 99, (byte)0, null, "默认站点" },
                    { 2, "admin", new DateTime(2024, 6, 23, 0, 0, 2, 0, DateTimeKind.Unspecified), null, "/", 1, null, 99, (byte)0, null, "首页" },
                    { 3, "admin", new DateTime(2024, 6, 23, 0, 0, 3, 0, DateTimeKind.Unspecified), null, "/news", 1, null, 99, (byte)0, null, "新闻资讯" },
                    { 4, "admin", new DateTime(2024, 6, 23, 0, 0, 4, 0, DateTimeKind.Unspecified), null, "/photo", 1, null, 100, (byte)0, null, "图片分享" },
                    { 5, "admin", new DateTime(2024, 6, 23, 0, 0, 5, 0, DateTimeKind.Unspecified), null, "/video", 1, null, 100, (byte)0, null, "视频中心" },
                    { 6, "admin", new DateTime(2024, 6, 23, 0, 0, 6, 0, DateTimeKind.Unspecified), null, "/down", 1, null, 100, (byte)0, null, "资源下载" },
                    { 7, "admin", new DateTime(2024, 6, 23, 0, 0, 7, 0, DateTimeKind.Unspecified), null, "/shop", 1, null, 99, (byte)0, null, "购物商城" }
                });

            migrationBuilder.InsertData(
                table: "dt_sites",
                columns: new[] { "Id", "AddBy", "AddTime", "Address", "Company", "Copyright", "Crod", "DirPath", "Email", "Fax", "IsDefault", "Logo", "Name", "SeoDescription", "SeoKeyword", "SeoTitle", "SortId", "Status", "Tel", "Title" },
                values: new object[] { 1, "admin", new DateTime(2024, 4, 1, 9, 30, 54, 0, DateTimeKind.Unspecified), "深圳市宝安区西乡街道九围新村4区217-3幢303室", "深圳市动力启航软件有限公司", "版权所有 © 2009-2024 深圳市动力启航软件有限公司 All Rights Reserved.", "粤ICP备11064298号", "main", "info@dtcms.net", null, (byte)1, null, "default", "让更多的人分享互联网开发技术", "动力启航,DTCMS系统,ASP.NETCore开源,开源CMS,网站管理系统,互联网开发", "DTcms网站管理系统 - 动力启航_开源cms_NetCore开源cms_vue开源cms", 99, (byte)0, "13800138000", "默认站点" });

            migrationBuilder.InsertData(
                table: "dt_sysconfig",
                columns: new[] { "Id", "JsonData", "Type" },
                values: new object[,]
                {
                    { 1, "{\"WebName\":\"DTcms内容管理系统\",\"WebCompany\":\"深圳市动力启航软件有限公司\",\"WebAddress\":\"广东省深圳市宝安区西乡街道\"}", "SysConfig" },
                    { 2, "{\"DistributionStatus\":0,\"DistributionType\":[0,1,2,3]}", "OrderConfig" },
                    { 3, "{\"RegStatus\":0,\"RegVerify\":0,\"RegMsgStatus\":1}", "MemberConfig" }
                });

            migrationBuilder.InsertData(
                table: "dt_users",
                columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "Email", "EmailConfirmed", "LastIp", "LastTime", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "RefreshToken", "SecurityStamp", "Status", "TwoFactorEnabled", "UserName" },
                values: new object[] { 1, 0, "72420059-828a-4eb1-b27e-3dcf60416724", "info@dtcms.net", false, null, null, true, null, "INFO@DTCMS.NET", "ADMIN", "AQAAAAEAACcQAAAAEIIVfBoAbx7EGyOLtH4hZFyeFT819ygZx7ROkladOIfjcsKvMn7PfJCIWApFEtvsSA==", "13800138000", false, null, "XUIGJZRH36KYEUGW3MFUXHQW73OC4C77", (byte)0, false, "admin" });

            migrationBuilder.InsertData(
                table: "dt_managers",
                columns: new[] { "Id", "AddTime", "Avatar", "IsAudit", "RealName", "UserId" },
                values: new object[] { 1, new DateTime(2024, 4, 1, 9, 29, 12, 0, DateTimeKind.Unspecified), null, (byte)0, "超级管理员", 1 });

            migrationBuilder.InsertData(
                table: "dt_site_channels",
                columns: new[] { "Id", "AddBy", "AddTime", "IsAlbum", "IsAttach", "IsComment", "IsContribute", "Name", "SiteId", "SortId", "Status", "Title" },
                values: new object[,]
                {
                    { 1, "admin", new DateTime(2024, 6, 23, 0, 0, 1, 0, DateTimeKind.Unspecified), (byte)0, (byte)0, (byte)1, (byte)1, "news", 1, 99, (byte)0, "新闻资讯" },
                    { 2, "admin", new DateTime(2024, 6, 23, 0, 0, 2, 0, DateTimeKind.Unspecified), (byte)1, (byte)0, (byte)1, (byte)1, "photo", 1, 100, (byte)0, "图片分享" },
                    { 3, "admin", new DateTime(2024, 6, 23, 0, 0, 3, 0, DateTimeKind.Unspecified), (byte)0, (byte)0, (byte)1, (byte)1, "video", 1, 101, (byte)0, "视频中心" },
                    { 4, "admin", new DateTime(2024, 6, 23, 0, 0, 4, 0, DateTimeKind.Unspecified), (byte)0, (byte)1, (byte)1, (byte)1, "down", 1, 102, (byte)0, "资源下载" },
                    { 5, "admin", new DateTime(2024, 6, 23, 0, 0, 5, 0, DateTimeKind.Unspecified), (byte)0, (byte)0, (byte)0, (byte)0, "content", 1, 103, (byte)0, "公司介绍" }
                });

            migrationBuilder.InsertData(
                table: "dt_user_roles",
                columns: new[] { "RoleId", "UserId" },
                values: new object[] { 3, 1 });

            migrationBuilder.CreateIndex(
                name: "IX_dt_app_advert_banners_AdvertId",
                table: "dt_app_advert_banners",
                column: "AdvertId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_albums_ArticleId",
                table: "dt_article_albums",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_attachs_ArticleId",
                table: "dt_article_attachs",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_category_relations_ArticleId",
                table: "dt_article_category_relations",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_category_relations_CategoryId",
                table: "dt_article_category_relations",
                column: "CategoryId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_comment_likes_CommentId",
                table: "dt_article_comment_likes",
                column: "CommentId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_comments_ArticleId",
                table: "dt_article_comments",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_comments_UserId",
                table: "dt_article_comments",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_contributes_ChannelId",
                table: "dt_article_contributes",
                column: "ChannelId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_field_values_ArticleId",
                table: "dt_article_field_values",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_groups_ArticleId",
                table: "dt_article_groups",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_groups_GroupId",
                table: "dt_article_groups",
                column: "GroupId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_label_relations_ArticleId",
                table: "dt_article_label_relations",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_label_relations_LabelId",
                table: "dt_article_label_relations",
                column: "LabelId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_likes_ArticleId",
                table: "dt_article_likes",
                column: "ArticleId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_article_likes_UserId",
                table: "dt_article_likes",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_articles_ChannelId",
                table: "dt_articles",
                column: "ChannelId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_managers_UserId",
                table: "dt_managers",
                column: "UserId",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_dt_member_attach_records_UserId",
                table: "dt_member_attach_records",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_member_balance_records_UserId",
                table: "dt_member_balance_records",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_member_messages_UserId",
                table: "dt_member_messages",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_member_point_records_UserId",
                table: "dt_member_point_records",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_member_recharges_UserId",
                table: "dt_member_recharges",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_members_GroupId",
                table: "dt_members",
                column: "GroupId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_members_SiteId",
                table: "dt_members",
                column: "SiteId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_members_UserId",
                table: "dt_members",
                column: "UserId",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_dt_order_payments_PaymentId",
                table: "dt_order_payments",
                column: "PaymentId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_order_payments_RechargeId",
                table: "dt_order_payments",
                column: "RechargeId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_order_payments_UserId",
                table: "dt_order_payments",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_role_claims_RoleId",
                table: "dt_role_claims",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "RoleNameIndex",
                table: "dt_roles",
                column: "NormalizedName",
                unique: true,
                filter: "[NormalizedName] IS NOT NULL");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_channel_fields_ChannelId",
                table: "dt_site_channel_fields",
                column: "ChannelId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_channels_SiteId",
                table: "dt_site_channels",
                column: "SiteId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_domains_SiteId",
                table: "dt_site_domains",
                column: "SiteId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_oauth_logins_OAuthId",
                table: "dt_site_oauth_logins",
                column: "OAuthId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_oauth_logins_UserId",
                table: "dt_site_oauth_logins",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_oauths_SiteId",
                table: "dt_site_oauths",
                column: "SiteId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_payments_PaymentId",
                table: "dt_site_payments",
                column: "PaymentId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_site_payments_SiteId",
                table: "dt_site_payments",
                column: "SiteId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_user_claims_UserId",
                table: "dt_user_claims",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_user_logins_UserId",
                table: "dt_user_logins",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_dt_user_roles_RoleId",
                table: "dt_user_roles",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "EmailIndex",
                table: "dt_users",
                column: "NormalizedEmail");

            migrationBuilder.CreateIndex(
                name: "UserNameIndex",
                table: "dt_users",
                column: "NormalizedUserName",
                unique: true,
                filter: "[NormalizedUserName] IS NOT NULL");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "dt_app_advert_banners");

            migrationBuilder.DropTable(
                name: "dt_app_feedbacks");

            migrationBuilder.DropTable(
                name: "dt_app_links");

            migrationBuilder.DropTable(
                name: "dt_areas");

            migrationBuilder.DropTable(
                name: "dt_article_albums");

            migrationBuilder.DropTable(
                name: "dt_article_attachs");

            migrationBuilder.DropTable(
                name: "dt_article_category_relations");

            migrationBuilder.DropTable(
                name: "dt_article_comment_likes");

            migrationBuilder.DropTable(
                name: "dt_article_contributes");

            migrationBuilder.DropTable(
                name: "dt_article_field_values");

            migrationBuilder.DropTable(
                name: "dt_article_groups");

            migrationBuilder.DropTable(
                name: "dt_article_label_relations");

            migrationBuilder.DropTable(
                name: "dt_article_likes");

            migrationBuilder.DropTable(
                name: "dt_manager_logs");

            migrationBuilder.DropTable(
                name: "dt_manager_menu_models");

            migrationBuilder.DropTable(
                name: "dt_manager_menus");

            migrationBuilder.DropTable(
                name: "dt_managers");

            migrationBuilder.DropTable(
                name: "dt_member_attach_records");

            migrationBuilder.DropTable(
                name: "dt_member_balance_records");

            migrationBuilder.DropTable(
                name: "dt_member_messages");

            migrationBuilder.DropTable(
                name: "dt_member_point_records");

            migrationBuilder.DropTable(
                name: "dt_members");

            migrationBuilder.DropTable(
                name: "dt_notify_templates");

            migrationBuilder.DropTable(
                name: "dt_order_payments");

            migrationBuilder.DropTable(
                name: "dt_role_claims");

            migrationBuilder.DropTable(
                name: "dt_site_channel_fields");

            migrationBuilder.DropTable(
                name: "dt_site_domains");

            migrationBuilder.DropTable(
                name: "dt_site_menus");

            migrationBuilder.DropTable(
                name: "dt_site_oauth_logins");

            migrationBuilder.DropTable(
                name: "dt_sysconfig");

            migrationBuilder.DropTable(
                name: "dt_user_claims");

            migrationBuilder.DropTable(
                name: "dt_user_logins");

            migrationBuilder.DropTable(
                name: "dt_user_roles");

            migrationBuilder.DropTable(
                name: "dt_user_tokens");

            migrationBuilder.DropTable(
                name: "dt_app_adverts");

            migrationBuilder.DropTable(
                name: "dt_article_categorys");

            migrationBuilder.DropTable(
                name: "dt_article_comments");

            migrationBuilder.DropTable(
                name: "dt_article_labels");

            migrationBuilder.DropTable(
                name: "dt_member_groups");

            migrationBuilder.DropTable(
                name: "dt_member_recharges");

            migrationBuilder.DropTable(
                name: "dt_site_payments");

            migrationBuilder.DropTable(
                name: "dt_site_oauths");

            migrationBuilder.DropTable(
                name: "dt_roles");

            migrationBuilder.DropTable(
                name: "dt_articles");

            migrationBuilder.DropTable(
                name: "dt_users");

            migrationBuilder.DropTable(
                name: "dt_payments");

            migrationBuilder.DropTable(
                name: "dt_site_channels");

            migrationBuilder.DropTable(
                name: "dt_sites");
        }
    }
}
